<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>对象的方法-Object.keys</title>
</head>
<body>
  <script>
    /* 
      Object.keys()
        以数组的形式返回对象所有的属性（key）
    */

    let obj = {
      name: '小vue',
      age: 5,
      author: '尤雨溪'
    }
    // console.log(Object.keys(obj))
    Object.keys(obj).forEach(key => {
      console.log(obj[key])
    })
  </script>
</body>
</html>